home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / demo / pwrtcp11.exe / POWERTCP.H_ / POWERTCP.bin
Text File  |  1995-02-05  |  23KB  |  578 lines

  1. //************************************************************************
  2. //
  3. //  Module: powertcp.h
  4. //
  5. //  Purpose:
  6. //    PowerTCP header file defines C access function for all PowerTCP DLLs
  7. //             
  8. //************************************************************************
  9. //
  10. //  Written by Dart Communication Application Programming Group.
  11. //  Copyright (c) 1994 Dart Communications.  All Rights Reserved.
  12. //
  13. //************************************************************************
  14.  
  15. /*
  16.  PT_EXCEPTION enummerates all possible error conditions for any channel
  17.  */
  18.  
  19. typedef enum
  20. {
  21. PT_OK=0,                    /* OK...ErrorDesc can be advisory or NULL */
  22. PT_HARDWARE=1,            /* hardware failure */
  23. PT_PROTOCOL=2,            /* protocol software failure */
  24. PT_BADNAME=3,            /* name of host cannot be resolved to address */
  25. PT_CONNREFUSED=4,        /* connection to host refused - remote host is not listening */ 
  26. PT_NOROUTE=5,            /* no route to host (check network part of address) */
  27. PT_NOHOST=6,            /* remote host is not available (check host part of address) */
  28. PT_NOMEM=7,                /* insufficient resources to accept buffer or create channel */
  29. PT_ADDRINUSE=8,        /* address/port in use */
  30. PT_NOTCONNECTED=9,    /* attempt made to use a session that is not PT_CONNECTED */
  31. PT_NORESOURCE=10,        /* insufficient resources on host */
  32. PT_NOTACCEPTED=11,    /* applicaton did not properly accept passive connection */
  33. PT_SOFTWARE=12,        /* general software error */
  34. PT_REMOTECLOSE=13,    /* remote host reset or closed connection */
  35. PT_WARNING=14,            /* general warning */
  36. PT_ERROR=15,            /* general error */
  37. PT_LAST=16                /* placeholder */
  38. }    PT_EXCEPTION;
  39.  
  40. /*
  41.  PT_PROTOCOL enumerates the PowerTCP protocol types
  42.  */
  43.  
  44. typedef enum
  45. {
  46. PT_NULL=0,            /* NULL Protocol */
  47. PT_TCP=1,            /* Transmission Control Protocol */
  48. PT_TNT=2,            /* TELNET */
  49. PT_FTP=3,            /* File Transfer Protocol */
  50. PT_UDP=4,            /* user datagram protocol */
  51. PT_VT=5,                /* VT emulator */
  52. PT_SNMP=6,            /* Simple Network Management Protocol */
  53. PT_SMTP=7            /* (SMT) Simple Mail Transfer Protocol */
  54. }    PT_TYPE;
  55.  
  56. /*
  57.  PT_STATE enumerates possible states for any session...
  58.  */
  59.  
  60. typedef enum
  61. {
  62. PT_INVALID=0,            /* invalid or error */
  63. PT_CLOSED=1,            /* closed session (steady state) */
  64. PT_CONNECTING=2,        /* in process of initializing session (transition state) */
  65. PT_CONNECTED=4,        /* session is operating (steady state) */
  66. PT_LISTENING=8,        /* session is listening for a connection (steady state) */
  67. PT_CLOSING=16            /* in process of closing session (transition state) */
  68. }    PT_STATE;
  69.  
  70. /*
  71.  PT_FLAGS enumerates possible socket options and flags supported by PowerTCP
  72.  */
  73.  
  74. typedef enum
  75. {
  76. PT_NOFLAGS=0,        /* use this to specify no flags */
  77. PT_DEBUG=1,            /* enable all debugging features for session */
  78. PT_REUSEADDR=2,    /* allow the socket to be bound to an address in use */
  79. PT_KEEPALIVE=4,    /* send keepalives (TCP only) */
  80. PT_SHOW=8,            /* show each listener and connection as an icon */
  81. PT_TCPNODELAY=16    /* enables TCP_NODELAY socket option */
  82. }    PT_FLAGS;
  83.  
  84. /*
  85.  FTP_FILE_STRUCT enumerates possible file structures
  86.  */
  87.  
  88. typedef enum
  89.     {
  90.     FTP_FILE,
  91.     FTP_RECORD,
  92.     FTP_PAGE
  93.     } FTP_FILE_STRUCT;
  94.     
  95. /*
  96.  FTP_TRANSFER_MODE enumerates possible file transfer modes
  97.  */
  98.  
  99. typedef enum
  100.     {
  101.     FTP_STREAM,
  102.     FTP_BLOCK,
  103.     FTP_COMPRESSED
  104.     } FTP_TRANSFER_MODE;
  105.     
  106. /*
  107.  FTP_COMMAND enumerates the different FTP commands sent to host
  108.  */
  109.  
  110. typedef enum {
  111.     FTP_CLOSED=0,    /* control connection closed */
  112.     FTP_CLEAR=1,    /* no outstanding request or user used backdoor */
  113.     FTP_USER=2,        /* username sent */
  114.     FTP_PASS=3,        /* password sent */
  115.     FTP_ACCT=4,        /* acct sent */
  116.     FTP_CWD=5,        /* changing working directory */
  117.     FTP_CDUP=6,        /* changing working directory up one level */
  118.     FTP_SMNT=7,        /* do a structured mount */
  119.     FTP_QUIT=8,        /* quit and release all resources or connection closed */
  120.     FTP_REIN=9,        /* reinitialize */
  121.     FTP_PORT=10,    /* set data port */
  122.     FTP_PASV=11,    /* instruct server to go passive */
  123.     FTP_TYPE=12,    /* change type file */
  124.     FTP_STRU=13,    /* specify file structure */
  125.     FTP_MODE=14,    /* specify data transfer mode */
  126.     FTP_RETR=15,    /* receiving a file */
  127.     FTP_STOR=16,    /* sending a file with create option */
  128.     FTP_STOU=17,    /* sending a file with create unique option */
  129.     FTP_APPE=18,    /* sending a file with append (create) option */
  130.     FTP_ALLO=19,    /* allocate storage on host */
  131.     FTP_REST=20,    /* restart file transfer */
  132.     FTP_RNFR=21,    /* rename from */
  133.     FTP_RNTO=22,    /* rename to */
  134.     FTP_ABOR=23,    /* abort control connection */
  135.     FTP_DELE=24,    /* deleting a file */
  136.     FTP_RMD=25,        /* remove dir */
  137.     FTP_MKD=26,        /* make a directory */
  138.     FTP_PWD=27,        /* print working directory */
  139.     FTP_LIST=28,    /* waiting for a directory listing */
  140.     FTP_NLST=29,    /* waiting for a name listing */
  141.     FTP_SITE=30,    /* special site instructions */
  142.     FTP_SYST=31,    /* get type of operating system */  
  143.     FTP_STAT=32,    /* get status info */
  144.     FTP_HELP=33,    /* help request */
  145.     FTP_NOOP=34,    /* noop request */
  146.     
  147.     FTP_END
  148.             }    FTP_COMMAND;
  149.     
  150. /*
  151.  FTP_STATUS enumerates the status of FTP replies from host
  152.  */
  153.  
  154. typedef enum {
  155.     FTP_UNKNOWN=0,        /* spontaneous data or reply from "backdoor" */
  156.     FTP_SUCCESS=1,        /* operation completed sucessfully */
  157.     FTP_ERROR=2,        /* unexpected error */
  158.     FTP_FAILURE=3,        /* failure to complete successfully */
  159.     FTP_WORKING=4        /* informative...wait for next */
  160.             }    FTP_STATUS;
  161.  
  162. /*
  163.    PowerTCP typedefs...
  164. */
  165.  
  166. DECLARE_HANDLE (HPOWERTCP);   /* handle */
  167.  
  168. typedef void (CALLBACK * ACCEPTEVENT)(
  169.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  170.     DWORD     UserData   /* UserData from Listen() function */
  171.     );
  172. typedef void (CALLBACK * CMDEVENT)(
  173.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  174.     DWORD     UserData,  /* UserData from Connect() function */
  175.     BYTE      Cmd,       /* TELNET command (WILL, WONT, DO, DONT...) */ 
  176.     BYTE      Option,    /* TELNET option number */ 
  177.     LPBYTE    SubOption, /* pointer to sub-option string */ 
  178.     size_t    ByteCnt    /* byte count for SubOption */
  179.     );
  180. typedef void (CALLBACK * CONNECTEVENT)(
  181.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  182.     DWORD     UserData,  /* UserData from Connect() function */
  183.     LPCSTR    RemoteDotAddr, /* remote host connected to in dot notation */
  184.     WORD      RemotePort,/* remote port connected to */
  185.     LPCSTR    LocalDotAddr, /* local host address in dot notation */
  186.     WORD      LocalPort, /* local port */
  187.     LPCSTR    LocalName  /* name of default local host */
  188.     );
  189. typedef void (CALLBACK * CONNECTUDPEVENT)(
  190.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  191.     DWORD     UserData,  /* UserData from Connect() function */
  192.     LPCSTR    LocalDotAddr, /* local host address in dot notation */
  193.     WORD      LocalPort, /* local port */
  194.     LPCSTR    LocalName, /* name of default local host */
  195.     WORD      MaxByteCnt /* largest datagram size supported */
  196.     );
  197. typedef void (CALLBACK * EXCEPTIONEVENT)(
  198.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  199.     DWORD     UserData,  /* UserData from Connect() function */
  200.     PT_EXCEPTION ErrorCode,  /* spontaneous exception notification */
  201.     LPCSTR    ErrorDesc  /* description of error */
  202.     );
  203. typedef void (CALLBACK * EXCEPTIONUDPEVENT)(
  204.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  205.     DWORD     UserData,  /* UserData from Connect() function */
  206.     PT_EXCEPTION ErrorCode,  /* spontaneous exception notification */
  207.     LPCSTR    ErrorDesc, /* description of error */
  208.     DWORD     DataTag    /* identification of datagram where failure occurred */
  209.     );
  210. typedef void (CALLBACK * LISTENEVENT)(
  211.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  212.     DWORD     UserData,  /* UserData from Connect() function */
  213.     LPCSTR    LocalDotAddr, /* local host address in dot notation */
  214.     WORD      LocalPort, /* local port */
  215.     LPCSTR    LocalName  /* name of default local host */
  216.     );
  217. typedef void (CALLBACK * LOGEVENT)(
  218.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  219.     DWORD     UserData,  /* UserData from Connect() function */
  220.     LPCSTR    Message    /* Message log */
  221.     );
  222. typedef void (CALLBACK * RECVEVENT)(
  223.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  224.     DWORD     UserData,  /* UserData from Connect() function */
  225.     LPVOID    Data,          /* data from remote source */ 
  226.     size_t    ByteCnt    /* byte count for Data */
  227.     );
  228. typedef void (CALLBACK * RECVUDPEVENT)(
  229.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  230.     DWORD     UserData,  /* UserData from Connect() function */
  231.     LPVOID    Data,          /* data from remote source */ 
  232.     size_t    ByteCnt,   /* byte count for RecvData */
  233.     LPCSTR    RemoteDotAddr, /* source address of datagram */
  234.     WORD      RemotePort /* source port of datagram */
  235.     );
  236. typedef void (CALLBACK * REPLYEVENT)(
  237.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  238.     DWORD     UserData,  /* UserData from Connect() function */
  239.     FTP_STATUS Status,   /* FTP completion status */
  240.     FTP_COMMAND LastCommand, /* last command sent */
  241.     int ReplyCode,       /* 3-digit FTP reply code */
  242.     LPCSTR ReplyStr      /* Reply string */
  243.     );
  244. typedef void (CALLBACK * SENDEVENT)(
  245.     HPOWERTCP hSession,    /* identifies session notifying our app */ 
  246.     DWORD     UserData,  /* UserData from Connect() function */
  247.     DWORD     DataTag    /* DataTag from Send() functions */
  248.     );
  249.  
  250. #ifdef __cplusplus
  251. extern "C" {
  252. #endif
  253.  
  254. /*
  255.    PowerTCP DLL functions follow...
  256. */
  257.  
  258. /* TCP functions for PxxTCPC2.DLL */
  259. /* ConnectTelnet() generates an ConnectEvent() notification if successful */
  260. HPOWERTCP CALLBACK ConnectTcp (
  261.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  262.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */
  263.     PT_FLAGS Flags,        /* specify desired flags */ 
  264.     LPCSTR RemoteHost,   /* use name or dot notation */ 
  265.     WORD RemotePort,     /* port to connect to (usually 23 for TELNET) */ 
  266.     LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */ 
  267.     WORD LocalPort,        /* normally 0 for "don't care", but can be specified */
  268.     CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */ 
  269.     RECVEVENT RecvEvent, /* your event handler for receiving data */ 
  270.     SENDEVENT SendEvent, /* your event handler for Send confirmation */ 
  271.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  272.     );
  273. /* ListenTcp() always generates an ListenEvent() notification */
  274. HPOWERTCP CALLBACK ListenTcp (
  275.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  276.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */ 
  277.     PT_FLAGS Flags,        /* specify desired flags */ 
  278.     LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */ 
  279.     WORD LocalPort,      /* port for accepting connections (usually 23 for TELNET) */ 
  280.     LISTENEVENT ListenEvent, /* your event handler for session Open/Close notification */ 
  281.     RECVEVENT RecvEvent, /* new for v. 1.1...notifies you of closed listener */ 
  282.     ACCEPTEVENT AcceptEvent, /* your event handler for accepting a connection */ 
  283.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  284.     );
  285. /* AcceptTcp() always generates a ConnectEvent() notification */
  286. HPOWERTCP CALLBACK AcceptTcp (
  287.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  288.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */
  289.     PT_FLAGS Flags,        /* specify desired flags */ 
  290.     HPOWERTCP hListener,    /* hPowerTcp that generated AcceptEvent() */ 
  291.     CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */ 
  292.     RECVEVENT RecvEvent, /* your event handler for receiving data */ 
  293.     SENDEVENT SendEvent, /* your event handler for Send confirmation */ 
  294.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  295.     );
  296. /* SendTcp() always generates a SendEvent() notification */
  297. BOOL CALLBACK SendTcp (
  298.     HPOWERTCP hSession,    /* identifies session for sending data */ 
  299.     LPVOID Data,             /* pointer to data for sending */ 
  300.     size_t ByteCnt,      /* data count to send */
  301.     BOOL Urgent,            /* urgent flag for out-of-band data (usually not used) */ 
  302.     DWORD DataTag        /* id tag for data sent */
  303.     );
  304. /* CloseTcp() always generates a RecvEvent() notification with NULL parameters */
  305. BOOL CALLBACK CloseTcp (
  306.     HPOWERTCP hSession,    /* identifies session */ 
  307.     BOOL Abort                /* if TRUE, outstanding buffers are lost */
  308.                          /* if FALSE, gracefull close is attempted */
  309.     );
  310. /* StateTcp() just returns PT_STATE */
  311. PT_STATE CALLBACK StateTcp (
  312.     HPOWERTCP hSession    /* identifies session */ 
  313.     );
  314. /* RecvTcp() will generate at least one RecvEvent() if data is in the network buffers */
  315. BOOL CALLBACK RecvTcp (
  316.     HPOWERTCP hSession,    /* identifies session */
  317.     size_t MaxRecvCnt        /* maximum ByteCnt for any RecvEvent() */ 
  318.     );
  319.  
  320. /* TELNET functions for PxxTNTC2.DLL */
  321. /* ConnectTelnet() generates an ConnectEvent() notification if successful */
  322. HPOWERTCP CALLBACK ConnectTelnet (
  323.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  324.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */ 
  325.     PT_FLAGS Flags,        /* specify desired flags */ 
  326.     LPCSTR RemoteHost,   /* use name or dot notation */ 
  327.     WORD RemotePort,     /* port to connect to (usually 23 for TELNET) */ 
  328.     LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */ 
  329.     WORD LocalPort,        /* normally 0 for "don't care", but can be specified */
  330.     CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */ 
  331.     RECVEVENT RecvEvent, /* your event handler for receiving data */ 
  332.     SENDEVENT SendEvent, /* your event handler for Send confirmation */ 
  333.     CMDEVENT CmdEvent,   /* your event handler for received TELNET commands */ 
  334.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  335.     );
  336. /* ListenTelnet() always generates an ListenEvent() notification */
  337. HPOWERTCP CALLBACK ListenTelnet (
  338.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  339.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */ 
  340.     PT_FLAGS Flags,        /* specify desired flags */ 
  341.     LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */ 
  342.     WORD LocalPort,      /* port for accepting connections (usually 23 for TELNET) */ 
  343.     LISTENEVENT ListenEvent, /* your event handler for session Open/Close notification */ 
  344.     RECVEVENT RecvEvent, /* new for v. 1.1...notifies you of closed listener */ 
  345.     ACCEPTEVENT AcceptEvent, /* your event handler for accepting a connection */ 
  346.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  347.     );
  348. /* AcceptTelnet() generates a ConnectEvent() notification if successful */
  349. HPOWERTCP CALLBACK AcceptTelnet (
  350.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  351.     LPCSTR OemLicense,   /* use license number assigned to you by Dart */
  352.     PT_FLAGS Flags,        /* specify desired flags */ 
  353.     HPOWERTCP hListener,    /* hPowerTcp that generated AcceptEvent() */ 
  354.     CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */ 
  355.     RECVEVENT RecvEvent, /* your event handler for receiving data */ 
  356.     SENDEVENT SendEvent, /* your event handler for Send confirmation */ 
  357.     CMDEVENT CmdEvent,   /* your event handler for received TELNET commands */ 
  358.     EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
  359.     );
  360. /* SendTelnet() always generates a SendEvent() notification */
  361. BOOL CALLBACK SendTelnet (
  362.     HPOWERTCP hSession,    /* identifies session for sending data */ 
  363.     LPVOID Data,         /* pointer to data for sending */ 
  364.     size_t ByteCnt,          /* data count to send */ 
  365.     BOOL Urgent,            /* urgent flag for out-of-band data (usually not used) */ 
  366.     DWORD DataTag   /* instance identification of data sent */
  367.     );
  368. /* SendTelnetCmd() always generates a SendEvent() notification */
  369. BOOL CALLBACK SendTelnetCmd (
  370.     HPOWERTCP hSession,    /* identifies session */ 
  371.     BYTE      Cmd,       /* TELNET command (WILL, WONT, DO, DONT...) */ 
  372.     BYTE      Option,    /* TELNET option number */ 
  373.     LPBYTE    SubOption, /* pointer to sub-option string */ 
  374.     size_t    ByteCnt,       /* byte count for SubOption */
  375.     DWORD DataTag   /* instance identification of data sent */
  376.     );
  377. /* CloseTelnet() always generates an ExceptionEvent() notification */
  378. BOOL CALLBACK CloseTelnet (
  379.     HPOWERTCP hSession,    /* identifies session */ 
  380.     BOOL Abort                /* if TRUE, outstanding buffers are lost */
  381.                          /* if FALSE, gracefull close is attempted */
  382.     );
  383. /* StateTelnet() just returns PT_STATE */
  384. PT_STATE CALLBACK StateTelnet (
  385.     HPOWERTCP hSession    /* identifies session */ 
  386.     );
  387. /* RecvTelnet() will generate at least one RecvEvent() if data is in the network buffers */
  388. BOOL CALLBACK RecvTelnet (
  389.     HPOWERTCP hSession,    /* identifies session */ 
  390.     size_t MaxRecvCnt        /* maximum ByteCnt for any RecvEvent() */ 
  391.     );
  392.  
  393. /* TELNET command definitions */
  394. #define SE_CMD 240
  395. #define NOP_CMD 241
  396. #define DATA_MARK_CMD 242
  397. #define BREAK_CMD 243
  398. #define INTERRUPT_PROCESS_CMD 244
  399. #define ABORT_OUTPUT_CMD 245
  400. #define ARE_YOU_THERE_CMD 246
  401. #define ERASE_CHARACTER_CMD 247
  402. #define ERASE_LINE_CMD 248
  403. #define GO_AHEAD_CMD 249
  404. #define WILL_CMD 251
  405. #define WONT_CMD 252
  406. #define DO_CMD 253
  407. #define DONT_CMD 254
  408. #define SB_CMD 250 /* suboption negotiation */
  409. #define IAC_CMD 255 /* decimal 255 */
  410. #define SE_CMD 240 /* decimal 240, suboption negotiation */
  411.  
  412. /* TELNET options */
  413. #define TERMTYPE_OPTION 24
  414.  
  415. /* FTP functions for PxxFTPC1.DLL */
  416.  
  417. /* AbortFtp() */
  418. BOOL CALLBACK AbortFtp(HPOWERTCP hSession);
  419.  
  420. /* AllocateFtp() */
  421. BOOL CALLBACK AllocateFtp(HPOWERTCP hSession,LONG MaxFileSize,
  422.                           LONG MaxRecordSize);
  423.  
  424. /* AppeFtp() */
  425. BOOL CALLBACK AppeFtp(HPOWERTCP hSession,LPSTR PathName);
  426.  
  427. /* ChDirFtp() */
  428. BOOL CALLBACK ChDirFtp(HPOWERTCP hSession,LPSTR NewDir);
  429.  
  430. /* ChDirUpFtp() */
  431. BOOL CALLBACK ChDirUpFtp(HPOWERTCP hSession);
  432.  
  433. /* CloseFtp() */
  434. BOOL CALLBACK CloseFtp(HPOWERTCP hSession);
  435.  
  436. /* CloseDataFtp() */
  437. BOOL CALLBACK CloseDataFtp(HPOWERTCP hSession);
  438.  
  439. /* CommandFtp() */
  440. BOOL CALLBACK CommandFtp(HPOWERTCP hSession,LPSTR CommandStr);
  441.  
  442. /* DeleteFtp() */
  443. BOOL CALLBACK DeleteFtp(HPOWERTCP hSession,LPSTR PathName);
  444.  
  445. /* FileStructFtp() */
  446. BOOL CALLBACK FileStructFtp(HPOWERTCP hSession,FTP_FILE_STRUCT Structure);
  447.  
  448. /* HelpFtp() */
  449. BOOL CALLBACK HelpFtp(HPOWERTCP hSession,LPSTR Command);
  450.  
  451. /* LastCommandFtp() */
  452. FTP_COMMAND CALLBACK LastCommandFtp(HPOWERTCP hSession);
  453.  
  454. /* ListFtp() */
  455. BOOL CALLBACK ListFtp(HPOWERTCP hSession,LPSTR PathName);
  456.  
  457. /* LoginFtp */
  458. HPOWERTCP CALLBACK LoginHostFtp(DWORD UserData,
  459.                                 LPCSTR LicenseKey,
  460.                                 PT_FLAGS Flags,
  461.                                 LPCSTR RemoteHost,
  462.                                 LPCSTR LocalDotAddr,
  463.                                 LPCSTR User,
  464.                                 LPCSTR Password,
  465.                                 LPCSTR Account,
  466.                                 CONNECTEVENT ConnectEvent,
  467.                                 LOGEVENT LogEvent,
  468.                                 RECVEVENT RecvEvent,
  469.                                 REPLYEVENT ReplyEvent,
  470.                                 SENDEVENT SendEvent);
  471.  
  472. /* LogoutFtp() */
  473. BOOL CALLBACK LogoutFtp(HPOWERTCP hSession);
  474.  
  475. /* MakeDirFtp() */
  476. BOOL CALLBACK MakeDirFtp(HPOWERTCP hSession,LPSTR PathName);
  477.  
  478. /* ModeFtp() */
  479. BOOL CALLBACK ModeFtp(HPOWERTCP hSession,FTP_TRANSFER_MODE TransferMode);
  480.  
  481. /* NameListFtp() */
  482. BOOL CALLBACK NameListFtp(HPOWERTCP hSession,LPSTR PathName);
  483.  
  484. /* NoopFtp() */
  485. BOOL CALLBACK NoopFtp(HPOWERTCP hSession);
  486.  
  487. /* PassiveFtp() */
  488. BOOL CALLBACK PassiveFtp(HPOWERTCP hSession);
  489.  
  490. /* PortFtp() */
  491. BOOL CALLBACK PortFtp(HPOWERTCP hSession,LPSTR HostPort);
  492.  
  493. /* PrintWorkingDirFtp() */
  494. BOOL CALLBACK PrintWorkingDirFtp(HPOWERTCP hSession);
  495.  
  496. /* ReinitializeFtp() */
  497. BOOL CALLBACK ReinitializeFtp(HPOWERTCP hSession);
  498.  
  499. /* RemoveDirFtp() */
  500. BOOL CALLBACK RemoveDirFtp(HPOWERTCP hSession,LPSTR PathName);
  501.  
  502. /* RenameFtp() */
  503. BOOL CALLBACK RenameFtp(HPOWERTCP hSession,LPSTR FromPathName,
  504.                         LPSTR ToPathName);
  505.  
  506. /* RestartFtp() */
  507. BOOL CALLBACK RestartFtp(HPOWERTCP hSession,LPSTR Marker);
  508.  
  509. /* RetrieveFtp() */
  510. BOOL CALLBACK RetrieveFtp(HPOWERTCP hSession,LPSTR PathName);
  511.  
  512. /* SendFtp() */
  513. BOOL CALLBACK SendFtp(HPOWERTCP hSession,LPVOID Data, size_t Cnt);
  514.  
  515. /* SiteFtp() */
  516. BOOL CALLBACK SiteFtp(HPOWERTCP hSession,LPSTR Desc);
  517.  
  518. /* StatusFtp() */
  519. BOOL CALLBACK StatusFtp(HPOWERTCP hSession,LPSTR PathName);
  520.  
  521. /* StoreFtp() */
  522. BOOL CALLBACK StoreFtp(HPOWERTCP hSession,LPSTR PathName);
  523.  
  524. /* StoreUniqueFtp() */
  525. BOOL CALLBACK StoreUniqueFtp(HPOWERTCP hSession,LPSTR PathName);
  526.  
  527. /* StructMountFtp() */
  528. BOOL CALLBACK StructMountFtp(HPOWERTCP hSession,LPSTR PathName);
  529.  
  530. /* SystemFtp() */
  531. BOOL CALLBACK SystemFtp(HPOWERTCP hSession);
  532.  
  533. /* TypeFtp() */
  534. BOOL CALLBACK TypeFtp(HPOWERTCP hSession,LPSTR RepType);
  535.  
  536. /* UDP functions for PxxUDPC1.DLL */
  537. /* ConnectUdp() generates an ConnectUdpEvent() notification if successful */
  538. HPOWERTCP CALLBACK ConnectUdp (
  539.     DWORD UserData,      /* user-defined data passed back by all callback functions */ 
  540.     LPCSTR OemLicense,    /* use license number assigned to you by Dart */
  541.     PT_FLAGS Flags,        /* specify desired flags */ 
  542.     LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */ 
  543.     WORD LocalPort,        /* normally 0 for "don't care", but can be specified */
  544.     CONNECTUDPEVENT ConnectUdpEvent, /* your event handler for session Open/Close notification */ 
  545.     RECVUDPEVENT RecvUdpEvent, /* your event handler for receiving data */ 
  546.     SENDEVENT SendEvent, /* your event handler for Send confirmation */ 
  547.     EXCEPTIONUDPEVENT ExceptionUdpEvent /* your event handler for exception notifications */
  548.     );
  549. /* SendUdp() always generates a SendUdpEvent() notification */
  550. BOOL CALLBACK SendUdp (
  551.     HPOWERTCP hSession,    /* identifies session for sending data */ 
  552.     LPCSTR RemoteHost,   /* use name or dot notation */ 
  553.     WORD RemotePort,     /* port to connect to (usually 23 for TELNET) */ 
  554.     LPVOID Data,             /* pointer to data for sending */ 
  555.     size_t ByteCnt,      /* data count to send */
  556.     DWORD DataTag        /* id tag for data sent */
  557.     );
  558. /* CloseUdp() always generates a RecvUdpEvent() notification with NULL parameters */
  559. BOOL CALLBACK CloseUdp (
  560.     HPOWERTCP hSession,    /* identifies session */ 
  561.     BOOL Abort                /* if TRUE, outstanding buffers are lost */
  562.                          /* if FALSE, gracefull close is attempted */
  563.     );
  564. /* StateUdp() just returns PT_STATE */
  565. PT_STATE CALLBACK StateUdp (
  566.     HPOWERTCP hSession    /* identifies session */ 
  567.     );
  568. /* RecvUdp() will generate at least one RecvUdpEvent() if data is in the network buffers */
  569. BOOL CALLBACK RecvUdp (
  570.     HPOWERTCP hSession    /* identifies session */ 
  571.     );
  572.  
  573.  
  574. #ifdef __cplusplus
  575. }
  576. #endif
  577.  
  578.